﻿<%@ WebHandler Language="C#" Class="del" %>

using System;
using System.Web;

public class del : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        object obj=context.Request.QueryString["sn"];
        if (obj!= null)
        {
            string sn = obj.ToString();
            NVR.BLL.NVRDevInfo nvr = new NVR.BLL.NVRDevInfo();
            //NVR.BLL.DeviceInfo dev = new NVR.BLL.DeviceInfo();
            string[] snArray = sn.Trim(',').Split(',');
            foreach (string str in snArray)
            {
                nvr.Delete(str);
                //dev.Delete(str);   
            }
        }
        context.Response.Write("1");
    }
    public bool IsReusable {
        get {
            return false;
        }
    }

}